home *** CD-ROM | disk | FTP | other *** search
- class classes.misc.SpeedBoost
- {
- var cMax;
- var baseSpeed;
- var c = 0;
- var Name = "speedBoost";
- function SpeedBoost(max)
- {
- this.cMax = max;
- this.baseSpeed = _root[_root.char].baseSpeed;
- }
- function main()
- {
- this.c = this.c + 1;
- _root[_root.char].speed = this.baseSpeed + (this.cMax - this.c) / (this.cMax / 3);
- if(this.c == this.cMax)
- {
- _root[_root.char].speed = _root[_root.char].baseSpeed;
- _root.removePowerUp("speedBoost");
- }
- }
- }
-